package com.atguigu.gmall.all.controller.api;

import com.atguigu.gmall.order.client.OrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @author wk
 * @create 2021-09-10 22:05
 */
@Controller
public class OrderController {
    @Autowired
    private OrderFeignClient orderFeignClient;
    // 跳转结算页面
    @GetMapping("/trade.html")
    public String trade(Model model) {
        Map tradeData = orderFeignClient.getTradeData();
        model.addAllAttributes(tradeData);
        return "order/trade";
    }
}
